
#ifndef _ROBOTANIMANTION_H__
#define _ROBOTANIMANTION_H__

#include "MotionAPI.hpp"

#include <vtkAssembly.h>
#include <QObject>
#include <QTimer>


#include "RobotExchange.hpp"


NAMESPACE_BEGIN(NSRobotAnimation)

class MOTIONAPI RobotAnimation : public QObject {
	Q_OBJECT
	SIGNALDEC(RobotAnimation, QObject)
public:
	void setFrame(int frame);
	void setPlay(bool play);
	void play();
	void stop();

	//void moveTo(double* tartget);

protected:
	void Initialize();
	void Finalize();

Q_SIGNALS:
	void requireRenderSignal();

public Q_SLOTS:
	void animationCallback();
	void rotateJoint(int robot_id, int joint_id, int deg, int frame = 30);

protected:
	QTimer* ani_timer;
	int m_frame;

};



NAMESPACE_END


#endif //! _ROBOTANIMANTION_H__